const http = require('http')
const httpServer = http.createServer()
const io = require('socket.io')

httpServer.listen(8081)

const ws = io.listen(httpServer)

ws.on('connection', socket => {
     socket.on('a', (...args) => {
          console.log(...args)
     })
})